package com.day0915.Task;

import java.util.Scanner;

public class TextMain {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        Order order = new Order();
        int choose;
        do{
            System.out.println("欢迎使用“吃货联盟订餐系统”");
            System.out.println("*****************************************");
            System.out.println("1.我要订餐");
            System.out.println("2.查看餐袋");
            System.out.println("3.签收订单");
            System.out.println("4.删除订单");
            System.out.println("5.我要点赞");
            System.out.println("6.退出系统");
            System.out.println("*****************************************");
            System.out.print("请输入数字1-6选择，输入0返回：");
            choose = in.nextInt();
            switch (choose){
                case 1:
                    System.out.println("***1.我要订餐***");
                    order.orderDish();
                    System.out.print("输入0返回：");
                    choose = in.nextInt();
                    break;
                case 2:
                    System.out.println("***2.查看餐袋***");
                    order.viewMealBag();
                    System.out.print("输入0返回：");
                    choose = in.nextInt();
                    break;
                case 3:
                    System.out.println("***3.签收订单***");
                    order.signInOrder();
                    System.out.print("输入0返回：");
                    choose = in.nextInt();
                    break;
                case 4:
                    System.out.println("***4.删除订单***");
                    order.deleteOrder();
                    System.out.print("输入0返回：");
                    choose = in.nextInt();
                    break;
                case 5:
                    System.out.println("***5.我要点赞***");
                    order.giveTheThumbsUp();
                    System.out.print("输入0返回：");
                    choose = in.nextInt();
                    break;
                case 6:
                    System.out.println("谢谢使用，欢迎下次光临！");
                    System.exit(0);//退出系统
                    break;
                case 0:
                    break;
                default:
                    System.out.println("请输入0-6的数字：");
                    choose = in.nextInt();
                    break;
            }
        }while (choose == 0);
    }
}
